package org.example.qqrobot.exception;

import org.example.qqrobot.model.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
//全局异常处理器
public class GlobalExceptionHandler {
    @ExceptionHandler(Exception.class)//捕获所有的异常
    public Result ex(Exception ex){
        ex.printStackTrace();
        return Result.error("请进行正确的操作！");
    }



}
